package com.nebula.service.nebulafeignces.client.listen;



import java.util.List;

/**
 * @Author: llq
 * @Date: 2019/9/18
 * MessageListenerConcurrently 采用的并发消费监听器
 */
public class MessageListener  {
//    implements MessageListenerConcurrently
    /*private MessageProcessor messageProcessor;

    public void setMessageProcessor(MessageProcessor messageProcessor) {
        this.messageProcessor = messageProcessor;
    }

    *//**
     * It is not recommend to throw exception,rather than returning ConsumeConcurrentlyStatus.RECONSUME_LATER if consumption failure
     *
     * @param msgs    msgs.size() >= 1<br> DefaultMQPushConsumer.consumeMessageBatchMaxSize=1,you can modify here
     * @param context 参数context用于消费的事务控制，可以用于设置是否自动提交，消息队列和当前队列的暂停时间
     * @return The consume status
     *//*
    @Override
    public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs, ConsumeConcurrentlyContext context) {
        for (MessageExt msg : msgs){
            //TODO 处理对应的业务逻辑
            boolean result = messageProcessor.handleMessage(msg);
            if (!result){
                return ConsumeConcurrentlyStatus.RECONSUME_LATER;
            }
        }
        return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
    }*/
}
